﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using kTudu.Web.Models;

namespace kTudu.Web.Factories
{
    public static class ModelFactory
    {
        private static Entities _instance = null;

        public static Entities GetInstance()
        {
            if (_instance == null)
                _instance = new Entities();

            return _instance;
        }

        public static void ClearInstance()
        {
            if (_instance != null)
            {
                _instance.Dispose();

                _instance = null;
            }
        }
    }
}